Optimal. Leaf size=93 \[ \frac {(b c-a d)^3}{2 a b^3 (a+b x)^2}+\frac {(b c-a d)^2 (b c+2 a d)}{a^2 b^3 (a+b x)}+\frac {c^3 \log (x)}{a^3}-\left (\frac {c^3}{a^3}-\frac {d^3}{b^3}\right ) \log (a+b x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {90}
\begin {gather*} -\left (\frac {c^3}{a^3}-\frac {d^3}{b^3}\right ) \log (a+b x)+\frac {c^3 \log (x)}{a^3}+\frac {(b c-a d)^2 (2 a d+b c)}{a^2 b^3 (a+b x)}+\frac {(b c-a d)^3}{2 a b^3 (a+b x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rubi steps
\begin {align*} \int \frac {(c+d x)^3}{x (a+b x)^3} \, dx &=\int \left (\frac {c^3}{a^3 x}+\frac {(-b c+a d)^3}{a b^2 (a+b x)^3}-\frac {(-b c+a d)^2 (b c+2 a d)}{a^2 b^2 (a+b x)^2}+\frac {-b^3 c^3+a^3 d^3}{a^3 b^2 (a+b x)}\right ) \, dx\\ &=\frac {(b c-a d)^3}{2 a b^3 (a+b x)^2}+\frac {(b c-a d)^2 (b c+2 a d)}{a^2 b^3 (a+b x)}+\frac {c^3 \log (x)}{a^3}-\left (\frac {c^3}{a^3}-\frac {d^3}{b^3}\right ) \log (a+b x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 88, normalized size = 0.95 \begin {gather*} \frac {2 c^3 \log (x)+\frac {\frac {a (b c-a d)^2 \left (3 a^2 d+2 b^2 c x+a b (3 c+4 d x)\right )}{(a+b x)^2}+2 \left (-b^3 c^3+a^3 d^3\right ) \log (a+b x)}{b^3}}{2 a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 133, normalized size = 1.43
method | result | size |
norman | \(\frac {\frac {\left (2 a^{3} d^{3}-3 a^{2} b c \,d^{2}+b^{3} c^{3}\right ) x}{a^{2} b^{2}}+\frac {3 a^{3} d^{3}-3 a^{2} b c \,d^{2}-3 a \,b^{2} c^{2} d +3 b^{3} c^{3}}{2 b^{3} a}}{\left (b x +a \right )^{2}}+\frac {c^{3} \ln \left (x \right )}{a^{3}}+\frac {\left (a^{3} d^{3}-b^{3} c^{3}\right ) \ln \left (b x +a \right )}{a^{3} b^{3}}\) | \(128\) |
risch | \(\frac {\frac {\left (2 a^{3} d^{3}-3 a^{2} b c \,d^{2}+b^{3} c^{3}\right ) x}{a^{2} b^{2}}+\frac {\frac {3}{2} a^{3} d^{3}-\frac {3}{2} a^{2} b c \,d^{2}-\frac {3}{2} a \,b^{2} c^{2} d +\frac {3}{2} b^{3} c^{3}}{b^{3} a}}{\left (b x +a \right )^{2}}+\frac {\ln \left (-b x -a \right ) d^{3}}{b^{3}}-\frac {\ln \left (-b x -a \right ) c^{3}}{a^{3}}+\frac {c^{3} \ln \left (x \right )}{a^{3}}\) | \(130\) |
default | \(\frac {\left (a^{3} d^{3}-b^{3} c^{3}\right ) \ln \left (b x +a \right )}{a^{3} b^{3}}-\frac {-2 a^{3} d^{3}+3 a^{2} b c \,d^{2}-b^{3} c^{3}}{a^{2} b^{3} \left (b x +a \right )}-\frac {a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}{2 b^{3} a \left (b x +a \right )^{2}}+\frac {c^{3} \ln \left (x \right )}{a^{3}}\) | \(133\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 143, normalized size = 1.54 \begin {gather*} \frac {c^{3} \log \left (x\right )}{a^{3}} + \frac {3 \, a b^{3} c^{3} - 3 \, a^{2} b^{2} c^{2} d - 3 \, a^{3} b c d^{2} + 3 \, a^{4} d^{3} + 2 \, {\left (b^{4} c^{3} - 3 \, a^{2} b^{2} c d^{2} + 2 \, a^{3} b d^{3}\right )} x}{2 \, {\left (a^{2} b^{5} x^{2} + 2 \, a^{3} b^{4} x + a^{4} b^{3}\right )}} - \frac {{\left (b^{3} c^{3} - a^{3} d^{3}\right )} \log \left (b x + a\right )}{a^{3} b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 212 vs.
\(2 (91) = 182\).
time = 0.74, size = 212, normalized size = 2.28 \begin {gather*} \frac {3 \, a^{2} b^{3} c^{3} - 3 \, a^{3} b^{2} c^{2} d - 3 \, a^{4} b c d^{2} + 3 \, a^{5} d^{3} + 2 \, {\left (a b^{4} c^{3} - 3 \, a^{3} b^{2} c d^{2} + 2 \, a^{4} b d^{3}\right )} x - 2 \, {\left (a^{2} b^{3} c^{3} - a^{5} d^{3} + {\left (b^{5} c^{3} - a^{3} b^{2} d^{3}\right )} x^{2} + 2 \, {\left (a b^{4} c^{3} - a^{4} b d^{3}\right )} x\right )} \log \left (b x + a\right ) + 2 \, {\left (b^{5} c^{3} x^{2} + 2 \, a b^{4} c^{3} x + a^{2} b^{3} c^{3}\right )} \log \left (x\right )}{2 \, {\left (a^{3} b^{5} x^{2} + 2 \, a^{4} b^{4} x + a^{5} b^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 209 vs.
\(2 (80) = 160\).
time = 0.80, size = 209, normalized size = 2.25 \begin {gather*} \frac {3 a^{4} d^{3} - 3 a^{3} b c d^{2} - 3 a^{2} b^{2} c^{2} d + 3 a b^{3} c^{3} + x \left (4 a^{3} b d^{3} - 6 a^{2} b^{2} c d^{2} + 2 b^{4} c^{3}\right )}{2 a^{4} b^{3} + 4 a^{3} b^{4} x + 2 a^{2} b^{5} x^{2}} + \frac {c^{3} \log {\left (x \right )}}{a^{3}} + \frac {\left (a d - b c\right ) \left (a^{2} d^{2} + a b c d + b^{2} c^{2}\right ) \log {\left (x + \frac {- a b^{2} c^{3} + \frac {a \left (a d - b c\right ) \left (a^{2} d^{2} + a b c d + b^{2} c^{2}\right )}{b}}{a^{3} d^{3} - 2 b^{3} c^{3}} \right )}}{a^{3} b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.85, size = 133, normalized size = 1.43 \begin {gather*} \frac {c^{3} \log \left ({\left | x \right |}\right )}{a^{3}} - \frac {{\left (b^{3} c^{3} - a^{3} d^{3}\right )} \log \left ({\left | b x + a \right |}\right )}{a^{3} b^{3}} + \frac {2 \, {\left (a b^{3} c^{3} - 3 \, a^{3} b c d^{2} + 2 \, a^{4} d^{3}\right )} x + \frac {3 \, {\left (a^{2} b^{3} c^{3} - a^{3} b^{2} c^{2} d - a^{4} b c d^{2} + a^{5} d^{3}\right )}}{b}}{2 \, {\left (b x + a\right )}^{2} a^{3} b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.24, size = 131, normalized size = 1.41 \begin {gather*} \frac {\frac {3\,\left (a^3\,d^3-a^2\,b\,c\,d^2-a\,b^2\,c^2\,d+b^3\,c^3\right )}{2\,a\,b^3}+\frac {x\,\left (2\,a^3\,d^3-3\,a^2\,b\,c\,d^2+b^3\,c^3\right )}{a^2\,b^2}}{a^2+2\,a\,b\,x+b^2\,x^2}-\ln \left (a+b\,x\right )\,\left (\frac {c^3}{a^3}-\frac {d^3}{b^3}\right )+\frac {c^3\,\ln \left (x\right )}{a^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________